﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>用户注册</title>
    <link href="css/common.css" rel="stylesheet" type="text/css" />
   <link rel="stylesheet" href="css/reg.css" />
   <script type="text/javascript">
   var isChecked=false;
   function gel(contrId)
   {
        return document.getElementById(contrId);
   }
   function checkUname()
   {
        var uName=gel("txtName").value;
        if(uName.length<6 || uName.length>16)
        {
            gel("msgUname").style.display="block";
            return;
        }else
        {
            gel("msgUname").style.display="none";
        }
   }
   function checkUPwd()
   {
        var uPwd=gel("txtPwd").value;
        if(uPwd.length<6 || uPwd.length>16)
        {
            gel("msgUpwd").style.display="block";
            return;
        }else
        {
            gel("msgUpwd").style.display="none";
        }
   }
   function checkUPwd2()
   {
        var uPwd=gel("txtPwd").value;
        var uPwd2=gel("txtPwd2").value;
        if(uPwd2.length<6 || uPwd2.length>16)
        {
            gel("msgUpwd2").style.display="block";
            return;
        }else if(uPwd!=uPwd2)
        {
            gel("msgUpwd2").style.display="block";
            gel("msgUpwd2").innerHTML="您两次密码输入";
            return;
        }else
        {
            gel("msgUpwd2").style.display="none";
        }
   }
  function changeImg()
  {
        //Random rand =new Random();
        //var s = rand.Next(); 
        var s = (new Date()).getSeconds();
        gel("imgCode").src = "VCode.ashx?i=" + s;
    }
   </script>
</head>
<body>
<center>
    <form id="form1" runat="server">
        <table id="title" border="0">
            <tr>
                <td>注册界面</td>
            </tr>
		</table>
		<table id="content" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="30%" class="descTd">用户名： </td>
                <td width="35%" ><input name="txtName" type="text" id="txtName" class="inputT" /></td>
                <td class="alertCol"><div id="msgUname" class="errMsg">6-16个英文或数字</div></td>
            </tr>
            <tr>
                <td class="descTd">密&nbsp;&nbsp;&nbsp;码：</td>
                <td ><input name="txtPwd" type="password" id="txtPwd" class="inputT" /></td>
                <td class="alertCol"><div id="msgUpwd" class="errMsg">6-16个英文或数字</div></td>
            </tr>
            <tr>
                <td class="descTd">密码确认：</td>
                <td ><input name="txtPwd2" type="password" id="txtPwd2" class="inputT" /></td>
                <td class="alertCol"><div id="msgUpwd2" class="errMsg">6-16个英文或数字</div></td>
            </tr>
            <tr>
                <td class="descTd">中文名：</td>
                <td ><input name="txtCnName" type="text" id="txtCnName" class="inputT" /></td>
                <td>
                </td>
            </tr>

                        <tr>
                <td class="descTd">班&nbsp;&nbsp;&nbsp;级：</td>
                <td ><select name="selClass"><%=GetClasses() %></select></td>
                <td>
                </td>
            </tr>

            <tr>
                <td class="descTd">性&nbsp;&nbsp;&nbsp;别：</td>
                <td align="left" style="padding-left:10px;" class="rdoTd">
                    <label for="rdoMale">男</label><input id="rdoMale" type="radio" class="rdoM" value="0" name="gender" />
                    <label for="rdoW">女</label><input id="rdoW" checked="checked" type="radio" value="1" class="rdoM" name="gender" />
                </td>
                <td></td>
            </tr>
			<tr>
                <td class="descTd">电&nbsp;&nbsp;&nbsp;话：</td>
                <td ><input name="txtTel" type="text" id="txtTel" class="inputT" /></td>
                <td >
                </td>
            </tr>
			<tr>
                <td class="descTd">验证码：</td>
                <td ><input name="txtCode" type="text" id="txtCode" class="inputT" /></td>
                <td class="alertCol"><div id="Div1" class="errMsg" style="display:block;width:90px;">
                <img id="imgCode" src="VCode.ashx" align="absmiddle" style="margin-right:5px;" />
                <span style="cursor:pointer;" onclick="changeImg();"></span></div></td>
            </tr>
			<tr><td></td>
                <td>
                    <input type="submit" id="btnReg" value="注册" class="btnC"/>
                    <input type="button" id="btnCancel" value="取消" class="btnC" />
                </td>
                <td></td>
            </tr>
        </table>
    </form>
</center> 
</body>
</html>
